package code4;

import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Code0 {

    public void code() {

        Code1 c1 = new Code1();
        List<Student> list = new LinkedList<>();
        boolean flag = true;
        while(flag){
            c1.printX();
            Scanner input = new Scanner(System.in);
            int i = input.nextInt();
            if(1 == i){
                new Code5().printAll(list);
            }else if(2 == i){
                new Code2().add(list);
            }else if(3 == i){
                new Code3().remove(list);
            }else if(4 == i){
                new Code6().modify(list);
            }else if(5 == i){
                new Code4().find(list);
            }else if(0 == i){
                flag = false;
            }else{
                System.out.println("输入数字不正确，请重新输入：");
            }
        }
    }
}
